home *** CD-ROM | disk | FTP | other *** search
/ SGI Performance Co-Pilot 1.3 / SGI Performance Co-Pilot 1.3.iso / dist / pcp.idb / usr / share / catman / u_man / cat1 / memvis.z.z / memvis.z / memvis
Text File  |  1997-04-03  |  22KB  |  397 lines

  1.  
  2.  
  3.  
  4. MMMMEEEEMMMMVVVVIIIISSSS((((1111))))                                                            MMMMEEEEMMMMVVVVIIIISSSS((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      memvis - Performance Co-Pilot graphical memory usage viewer
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      mmmmeeeemmmmvvvviiiissss [ ----iiii _i_n_t_e_r_v_a_l ]
  13.             [ ----mmmm | ----pppp | ----rrrr | ----ssss ] [ ----uuuu ]
  14.             [ ----tttt _t_h_r_e_s_h ] [ ----dddd _d_e_l_t_a ]
  15.             [ _p_r_o_g_s ... ]
  16.  
  17. NNNNOOOOTTTTEEEE
  18.      mmmmeeeemmmmvvvviiiissss is only shipped with PCP for IRIX 5.3.  Later IRIX versions
  19.      include ggggmmmmeeeemmmmuuuussssaaaaggggeeee(1) which provides all of the features of mmmmeeeemmmmvvvviiiissss, and
  20.      more.
  21.  
  22. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  23.      mmmmeeeemmmmvvvviiiissss is a graphical memory usage viewer.  mmmmeeeemmmmvvvviiiissss displays a bar chart
  24.      depicting the breakdown of memory use, with each bar labeled with the
  25.      name of the program using the memory and the number of Kilobytes of
  26.      memory used.  If more than one copy of a program is running, the number
  27.      of copies is displayed in parentheses after the program name.
  28.  
  29.      In addition, mmmmeeeemmmmvvvviiiissss will display a breakdown of the regions within a
  30.      program.  Clicking on a bar or program name in the main chart will
  31.      replace the main chart with a chart for that program, with each region
  32.      labeled with one of TTTTeeeexxxxtttt, DDDDaaaattttaaaa, BBBBrrrreeeeaaaakkkk, SSSSttttaaaacccckkkk, SSSShhhhmmmmeeeemmmm, PPPPhhhhyyyyssssiiiiccccaaaallll DDDDeeeevvvviiiicccceeee, RRRRWWWW,
  33.      RRRROOOO, and (if possible) the base name of the file or device corresponding
  34.      to each region.  If memvis is unable to determine the base name of the
  35.      file or device for a region that does correspond to a file or device,
  36.      memvis will display the inode number of the file or device.
  37.  
  38.      The meanings of these labels are as follows:
  39.  
  40.      TTTTeeeexxxxtttt      This region contains executable instructions.  These
  41.                instructions most likely came from an executable program file
  42.                or a dynamic shared object.
  43.  
  44.      DDDDaaaattttaaaa      This region contains program data.  Regions marked DDDDaaaattttaaaa are
  45.                usually associated with a particular executable program file or
  46.                a dynamic shared object.
  47.  
  48.      BBBBrrrreeeeaaaakkkk     Data region that is grown with bbbbrrrrkkkk(2).  This is the region that
  49.                contains memory allocated by mmmmaaaalllllllloooocccc(3C).
  50.  
  51.      SSSSttttaaaacccckkkk     Runtime stack.  This is region is used for procecure call
  52.                frames, and can grow if the program makes deeply nested
  53.                procedure calls or calls procedures that allocate large amounts
  54.                of stack space for temporary variables.
  55.  
  56.      SSSShhhhmmmmeeeemmmm     A System V shared memory region.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. MMMMEEEEMMMMVVVVIIIISSSS((((1111))))                                                            MMMMEEEEMMMMVVVVIIIISSSS((((1111))))
  71.  
  72.  
  73.  
  74.      PPPPhhhhyyyyssssiiiiccccaaaallll DDDDeeeevvvviiiicccceeee
  75.                Region corresponds to a physical device other than main memory,
  76.                such as a graphics device.
  77.  
  78.      RRRRWWWW        Read/Write data without the Copy on Write bit set.  This did
  79.                not come from an executable program file or a dynamic shared
  80.                object, and could be a memory mapped file.
  81.  
  82.      RRRROOOO        Read only data.
  83.  
  84.      UUUU aaaarrrreeeeaaaa &&&& PPPPTTTTEEEEssss
  85.                The user area and page table entries.  This is information that
  86.                the kernel uses to administer a process.
  87.  
  88.      Clicking on the IIIIrrrriiiixxxx bar in PPPPhhhhyyyyssssiiiiccccaaaallll MMMMeeeemmmmoooorrrryyyy BBBBrrrreeeeaaaakkkkddddoooowwwwnnnn mode (see below)
  89.      causes mmmmeeeemmmmvvvviiiissss to display a breakdown of the memory that it is charging to
  90.      the operating system.  Separate items include FFFFSSSS CCCCaaaacccchhhheeee, BBBBuuuuffffffffeeeerrrr DDDDaaaattttaaaa,
  91.      HHHHeeeeaaaapppp, SSSSttttrrrreeeeaaaammmmssss, ZZZZoooonnnneeee, BBBBSSSSDDDD NNNNeeeettttwwwwoooorrrrkkkkiiiinnnngggg, PPPPaaaaggggeeee FFFFrrrraaaammmmeeee DDDDaaaattttaaaa, KKKKeeeerrrrnnnneeeellll TTTTaaaabbbblllleeeessss, UUUUnnnniiiixxxx
  92.      DDDDaaaattttaaaa SSSSppppaaaacccceeee, UUUUnnnniiiixxxx CCCCooooddddeeee SSSSppppaaaacccceeee, SSSSyyyymmmmmmmmoooonnnn, and OOOOtttthhhheeeerrrr.
  93.  
  94.      When viewing the breakdown of program memory usage, clicking and dragging
  95.      on the shadow bar will switch the display to another program.
  96.  
  97.      The first time a program is clicked on, mmmmeeeemmmmvvvviiiissss reads in information about
  98.      executables and libraries on the system while displaying a wait message.
  99.      mmmmeeeemmmmvvvviiiissss keeps this information in its database file $_H_O_M_E/._m_e_m_v_i_s._i_n_o_d_e_s.
  100.      if this file does not exist or is older than /_u_n_i_x, mmmmeeeemmmmvvvviiiissss will create
  101.      it, which can take as long as a minute.  If the database already exists
  102.      and is newer than /_u_n_i_x, reading it will only take a few seconds.  See
  103.      EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT VVVVAAAARRRRIIIIAAAABBBBLLLLEEEESSSS below for information on customizing
  104.      $_H_O_M_E/._m_e_m_v_i_s._i_n_o_d_e_s.
  105.  
  106.      mmmmeeeemmmmvvvviiiissss has four different modes of viewing.  The default mode, PPPPhhhhyyyyssssiiiiccccaaaallll
  107.      MMMMeeeemmmmoooorrrryyyy BBBBrrrreeeeaaaakkkkddddoooowwwwnnnn, shows the amount of physical memory being used by each
  108.      process, the amount of free memory, and the amount of memory being used
  109.      by Irix.  The amount of memory charged to each process is calculated by
  110.      taking the pages each process has in memory and pro-rating the sizes with
  111.      the number of processes using each page.
  112.  
  113.      The mode TTTToooottttaaaallll SSSSiiiizzzzeeeessss ooooffff PPPPrrrroooocccceeeessssssss shows the the total sizes of all the
  114.      processes in the system.  This corresponds to the _S_Z field of ppppssss(1)
  115.      output.
  116.  
  117.      The mode RRRReeeessssiiiiddddeeeennnntttt SSSSiiiizzzzeeeessss ooooffff PPPPrrrroooocccceeeesssssssseeeessss shows the resident sizes of all the
  118.      processes in the system.  This corresponds to the _R_S_S field of ppppssss(1)
  119.      output.
  120.  
  121.      The mode RRRReeeessssiiiiddddeeeennnntttt MMMMaaaappppppppiiiinnnnggggssss shows the resident sizes of all mapped objects
  122.      in the system.  A mapped object can correspond to an executable file, a
  123.      dynamic shared object, a memory mapped file, or a region attached to a
  124.      process by rrrrlllldddd(1).
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. MMMMEEEEMMMMVVVVIIIISSSS((((1111))))                                                            MMMMEEEEMMMMVVVVIIIISSSS((((1111))))
  137.  
  138.  
  139.  
  140.      By default, mmmmeeeemmmmvvvviiiissss only displays programs that are using more than 500
  141.      Kilobytes of memory; programs using less than this are lumped together
  142.      and labeled <<<< 555500000000.  This threshhold is specifiable on the command line
  143.      and changeable at run time.
  144.  
  145.      Alternatively, a list of programs to monitor can be specified on the
  146.      command line (see below).  In this case, a bar for each of the programs
  147.      specified appears (as long as that program is running) and any threshhold
  148.      is ignored.
  149.  
  150.      In addition to the four basic viewing modes and the process region
  151.      breakdown, mmmmeeeemmmmvvvviiiissss cycles through displays of additional information when
  152.      the 'v' key is pressed.  This additional information is a subdivision of
  153.      each bar in the chart, with the right portion of each bar corresponding
  154.      to the additional information.  Down the right side of the window the
  155.      values corresponding to the right portion of each bar are displayed.
  156.  
  157.      The following additional information is available:
  158.  
  159.      PPPPrrrriiiivvvvaaaatttteeee   The portion of each bar that is private memory; that is, memory
  160.                which is not being shared.  This additional information is
  161.                available in all modes, except when viewing the Irix breakdown.
  162.  
  163.      SSSShhhhaaaarrrreeeedddd    The portion of each bar that is shared between more than one
  164.                process.  This is calculated by subtracting the PPPPrrrriiiivvvvaaaatttteeee amount
  165.                from the PPPPhhhhyyyyssssiiiiccccaaaallll amount for each bar.  SSSShhhhaaaarrrreeeedddd is available in
  166.                all modes, except when viewing the Irix breakdown.
  167.  
  168.      PPPPhhhhyyyyssssiiiiccccaaaallll  The portion of each bar that is consuming physical memory.
  169.                PPPPhhhhyyyyssssiiiiccccaaaallll is available in RRRReeeessssiiiiddddeeeennnntttt SSSSiiiizzzzeeeessss ooooffff PPPPrrrroooocccceeeesssssssseeeessss and TTTToooottttaaaallll
  170.                SSSSiiiizzzzeeeessss ooooffff PPPPrrrroooocccceeeesssssssseeeessss modes.
  171.  
  172.      RRRReeeessssiiiiddddeeeennnntttt  The portion of each bar that is resident in memory (without
  173.                taking sharing into acount).  RRRReeeessssiiiiddddeeeennnntttt is available in TTTToooottttaaaallll
  174.                SSSSiiiizzzzeeeessss ooooffff PPPPrrrroooocccceeeesssssssseeeessss mode.
  175.  
  176.      mmmmeeeemmmmvvvviiiissss has the following command line options:
  177.  
  178.      ----iiii _i_n_t_e_r_v_a_l
  179.                Update display every _i_n_t_e_r_v_a_l milliseconds.  The default in the
  180.                absence of the ----iiii option is 500.
  181.  
  182.      ----mmmm        Start using RRRReeeessssiiiiddddeeeennnntttt MMMMaaaappppppppiiiinnnnggggssss mode.
  183.  
  184.      ----pppp        Start using PPPPhhhhyyyyssssiiiiccccaaaallll MMMMeeeemmmmoooorrrryyyy BBBBrrrreeeeaaaakkkkddddoooowwwwnnnn mode.  This is the
  185.                default.
  186.  
  187.      ----rrrr        Start using RRRReeeessssiiiiddddeeeennnntttt SSSSiiiizzzzeeeessss ooooffff PPPPrrrroooocccceeeesssssssseeeessss mode.
  188.  
  189.      ----ssss        Start using TTTToooottttaaaallll SSSSiiiizzzzeeeessss ooooffff PPPPrrrroooocccceeeesssssssseeeessss mode.
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. MMMMEEEEMMMMVVVVIIIISSSS((((1111))))                                                            MMMMEEEEMMMMVVVVIIIISSSS((((1111))))
  203.  
  204.  
  205.  
  206.      ----uuuu        Rebuild the inode database $_H_O_M_E/._m_e_m_v_i_s._i_n_o_d_e_s even if it
  207.                isn't older than /_u_n_i_x (see FFFFIIIILLLLEEEESSSS below).
  208.  
  209.      ----tttt _t_h_r_e_s_h Use _t_h_r_e_s_h Kilobytes instead of 500 Kilobytes as the starting
  210.                threshhold.  Programs using less than this amount of memory in
  211.                a particular view are not displayed separately, but rather are
  212.                lumped together in a single bar.
  213.  
  214.      ----dddd _d_e_l_t_a  Change the threshhold by _d_e_l_t_a Kilobytes when the up and down
  215.                arrow keys are pressed (see below).  The default is to change
  216.                the threshhold by 50 Kilobytes.
  217.  
  218.      _p_r_o_g_s     Any command line arguments following the arguments described
  219.                above are interpreted as names of programs.  If program names
  220.                are specified, mmmmeeeemmmmvvvviiiissss only displays the memory usage of the
  221.                programs specified, with all other programs lumped together in
  222.                a bar labeled OOOOtttthhhheeeerrrr.  In this case, any threshhold or delta is
  223.                ignored.  This is useful when one is interested in the behavior
  224.                of a particular program or set of programs, such as when
  225.                testing for memory leaks.
  226.  
  227.    RRRRuuuunnnnttttiiiimmmmeeee ccccoooonnnnttttrrrroooollllssss
  228.      Some of mmmmeeeemmmmvvvviiiissss's display parameters can be modified at runtime.  Pressing
  229.      the 'p' key selects PPPPhhhhyyyyssssiiiiccccaaaallll MMMMeeeemmmmoooorrrryyyy BBBBrrrreeeeaaaakkkkddddoooowwwwnnnn mode.  Pressing the 'r' key
  230.      selects RRRReeeessssiiiiddddeeeennnntttt SSSSiiiizzzzeeeessss ooooffff PPPPrrrroooocccceeeesssssssseeeessss mode.  Pressing the 's' key selects
  231.      TTTToooottttaaaallll SSSSiiiizzzzeeeessss ooooffff PPPPrrrroooocccceeeesssssssseeeessss mode.
  232.  
  233.      Pressing the 'v' key cycles through the available additional information
  234.      for the current mode (see above discussion of additional information).
  235.  
  236.      The up arrow key increases the threshhold by 50 Kilobytes (default) or,
  237.      if the ----dddd option was specified, by _d_e_l_t_a Kilobytes.  The down arrow key
  238.      decreases the threshhold by the same amount.  When the threshhold is
  239.      decreased to 0, all progams running are displayed, even those that use no
  240.      memory (such as kernel processes).
  241.  
  242.      In the main view, clicking on a program's bar causes mmmmeeeemmmmvvvviiiissss to display a
  243.      detailed memory usage chart for that program.  In the detailed usage
  244.      view, clicking on the shadow bar switches the program being displayed,
  245.      and clicking outside the shadow bar or pressing the space bar returns to
  246.      the main view.
  247.  
  248.      At any time, pressing the 't' key causes mmmmeeeemmmmvvvviiiissss to print statistics about
  249.      the current view to the terminal window.  The fields in each line are
  250.      separated by tab characters to simplify the parsing of the output by
  251.      other programs (they are also padded with spaces).  There are three
  252.      different types of print outs:  AAAAllllllll PPPPrrrrooooggggrrrraaaammmmssss, RRRReeeessssiiiiddddeeeennnntttt MMMMaaaappppppppiiiinnnnggggssss, and
  253.      program breakdown.  Which gets printed depends on the mode mmmmeeeemmmmvvvviiiissss is in
  254.      when 't' is pressed.
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. MMMMEEEEMMMMVVVVIIIISSSS((((1111))))                                                            MMMMEEEEMMMMVVVVIIIISSSS((((1111))))
  269.  
  270.  
  271.  
  272.      The 'h' key brings up an on-line help screen, and the space bar returns
  273.      from there to viewing memory.  The escape key exits.
  274.  
  275. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  276.                $ memvis -p -t 1000 -d 100
  277.  
  278.      Bring up mmmmeeeemmmmvvvviiiissss in PPPPhhhhyyyyssssiiiiccccaaaallll MMMMeeeemmmmoooorrrryyyy BBBBrrrreeeeaaaakkkkddddoooowwwwnnnn mode, with programs using
  279.      1000 Kilobytes or more of memory displayed separately in their own bars.
  280.      The up and down arrow keys will increase and decrease the threshhold by
  281.      100 Kilobytes respectively.
  282.  
  283.                $ memvis -r xwsh toolchest 4Dwm Xsgi fm
  284.  
  285.      Bring up mmmmeeeemmmmvvvviiiissss in RRRReeeessssiiiiddddeeeennnntttt SSSSiiiizzzzeeeessss ooooffff PPPPrrrroooocccceeeesssssssseeeessss mode.  Display bars for
  286.      xxxxwwwwsssshhhh(1), ttttoooooooollllcccchhhheeeesssstttt(1), 4444DDDDwwwwmmmm(1), XXXXssssggggiiii(1), and ffffmmmm(1).  All other programs
  287.      will be combined into a bar labeled OOOOtttthhhheeeerrrr.
  288.  
  289. FFFFIIIILLLLEEEESSSS
  290.      $HOME/.memvis.inodes    Table of files that are likely to correspond to
  291.                              regions mapped into processes, along with inode
  292.                              numbers.  mmmmeeeemmmmvvvviiiissss builds this table if it doesn't
  293.                              exist or if it is older than /_u_n_i_x or if the ----uuuu
  294.                              option is supplied, and uses it to label the bars
  295.                              when viewing memory breakdown within a process.
  296.                              See EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT VVVVAAAARRRRIIIIAAAABBBBLLLLEEEESSSS below for information
  297.                              on altering how $_H_O_M_E/._m_e_m_v_i_s._i_n_o_d_e_s is built.
  298.  
  299.      /proc                   mmmmeeeemmmmvvvviiiissss gets memory usage information for
  300.                              processes from the /_p_r_o_c file system.
  301.  
  302. EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT VVVVAAAARRRRIIIIAAAABBBBLLLLEEEESSSS
  303.      UUUUSSSSAAAAGGGGEEEEPPPPAAAATTTTHHHH
  304.           Colon separated list of directories to recursively search when
  305.           building the inode database, HHHHOOOOMMMMEEEE////....mmmmeeeemmmmvvvviiiissss....iiiinnnnooooddddeeeessss.  If UUUUSSSSAAAAGGGGEEEEPPPPAAAATTTTHHHH is
  306.           not found in the environment, mmmmeeeemmmmvvvviiiissss uses the following default
  307.           path:
  308.  
  309.                /usr/ToolTalk:/usr/bin:/usr/lib:/usr/local:/usr/Cadmin:
  310.                /usr/CaseVision:/usr/sbin:/usr/bsd:/usr/etc:/lib:/sbin:
  311.                /bin:/etc:/usr/gfx
  312.  
  313. BBBBUUUUGGGGSSSS
  314.      The totals displayed for the breakdown of a program's regions do not
  315.      always add up exactly to the amount of memory in the main view.  In
  316.      PPPPhhhhyyyyssssiiiiccccaaaallll MMMMeeeemmmmoooorrrryyyy mode, this discrepancy is due to rounding error.  In
  317.      TTTToooottttaaaallll SSSSiiiizzzzeeee mode, this is often due to the inclusion of physical devices
  318.      in the breakdown.  The RRRReeeessssiiiiddddeeeennnntttt SSSSiiiizzzzeeee discrepancies are currently being
  319.      studied.
  320.  
  321.      Beware of "shared object amortization".  When a program that uses a
  322.      shared object (e.g. libXm.so) is started, the memory usage of all other
  323.      programs that use that shared object can decrease.  This is because the
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. MMMMEEEEMMMMVVVVIIIISSSS((((1111))))                                                            MMMMEEEEMMMMVVVVIIIISSSS((((1111))))
  335.  
  336.  
  337.  
  338.      amount of memory charged to each program for shared object usage is
  339.      prorated based on the amount of sharing.
  340.  
  341. AAAACCCCKKKKNNNNOOOOWWWWLLLLEEEEDDDDGGGGEEEEMMMMEEEENNNNTTTT
  342.      The code for mmmmeeeemmmmvvvviiiissss is based upon Roger Chickering's ggggmmmmeeeemmmmuuuussssaaaaggggeeee program.
  343.  
  344. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  345.      ggggrrrr____oooossssvvvviiiieeeewwww(1), ggggrrrr____ttttoooopppp(1), oooossssvvvviiiieeeewwww(1), ppppmmmmcccchhhhaaaarrrrtttt(1), ppppssss(1), ttttoooopppp(1) and
  346.      pppprrrroooocccc(4).
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.